window.onload = function(){
    //配置
    var config = {
        vx: 4,//点x轴速度,正为右，负为左
        vy:  4,//点y轴速度
        height: 2,//点高宽，其实为正方形，所以不宜太大
        width: 2,
        count: 100,//点个数
        color: "200,193,193",//点颜色
        stroke: "0,0,0",//线条颜色
        dist: 0,//点吸附距离
        e_dist: 0,//鼠标吸附加速距离
        max_conn: 10//点到点最大连接数
    }
    //调用
    CanvasParticle(config);
}

let privce=[[1200,0.3000],[2000,0.2500],[8000,0.2000]]

$a('.li2').forEach(function(v,i){
    v.addEventListener('click',function(){
        $a('.li2').forEach(function(a){
            a.classList.remove('active')
        })
        v.classList.add('active')
        $('.privce-s1').textContent=`￥${privce[i][0]}`
        $('.privce-s2').textContent=`${privce[i][1]}`
    })
    
})

// 选项卡
let p=$a('.iteam-api')


$a('.nav-title span').forEach(function(v,i){
    v.addEventListener('click',function(){
        $a('.nav-title span').forEach(function(a,b){
            a.classList.remove('colorbdff')
            p[b].style.display='none'
        })
        v.classList.add('colorbdff')
        p[i].style.display='block'
    })
})